package com.ocelot.san.dto;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class Operation implements Serializable {
	
	private static final long serialVersionUID = 3980084521967383142L;

	@Id
    @TableGenerator(name="TABLE_GEN", table="SEQUENCE_TABLE", pkColumnName="SEQ_NAME",
    valueColumnName="SEQ_COUNT", pkColumnValue="OPERATION_SEQ", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="TABLE_GEN")
	private Long id;
	private String escritura;
	
	@Temporal(TemporalType.TIMESTAMP)
	private java.util.Calendar date = Calendar.getInstance();

	@OneToOne(optional = false)
	private OperationType operationType;
	
	@OneToOne(optional = false)
	private Lawyer lawyer;
	
	@OneToOne(optional = false)
	private Notary notary;
	
	@OneToOne(optional = false)
	private Client client;
	
	private String comments;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getEscritura() {
		return escritura;
	}

	public void setEscritura(String escritura) {
		this.escritura = escritura;
	}

	public java.util.Calendar getDate() {
		return date;
	}

	public void setDate(java.util.Calendar date) {
		this.date = date;
	}

	public OperationType getOperationType() {
		return operationType;
	}

	public void setOperationType(OperationType operationType) {
		this.operationType = operationType;
	}

	public Lawyer getLawyer() {
		return lawyer;
	}

	public void setLawyer(Lawyer lawyer) {
		this.lawyer = lawyer;
	}

	public Notary getNotary() {
		return notary;
	}

	public void setNotary(Notary notary) {
		this.notary = notary;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}
	
}
